package com.blb.gateway_service.controller;

import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 错误处理控制器
 */
@RestController
public class ErrorHandleController implements ErrorController {
    @Override
    public String getErrorPath() {
        //返回错误路径
        return "error";
    }

    //处理错误方法
    @RequestMapping("error")
    public String error(){
        return "访问次数超过限制，请稍后访问！";
    }
}
